﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DailyRssDownload.Lib {
	[Serializable]
	public class RssFeedCollection : List<RssFeed> {
		public RssFeedCollection() : base() { }
		
		public RssFeedCollection(IEnumerable<RssFeed> lstFeeds) : base(lstFeeds) { }

		public RssFeedCollection(int intCapacity) : base(intCapacity) { }

		public static RssFeedCollection GetRssFeedsFromFeedCollection(FeedCollection objFeedCollection) {
			if (objFeedCollection == null) return new RssFeedCollection();

			IEnumerable<RssFeed> lstRssFeeds = from item in objFeedCollection
											   where item is RssFeed
											   select item as RssFeed;

			return new RssFeedCollection(lstRssFeeds);
		}
	}
}
